import request from '@/utils/request'

// 查询出差申请列表
export function listOaBusinessTravel(query) {
  return request({
    url: '/travel/oaBusinessTravel/list',
    method: 'get',
    params: query
  })
}

// 查询出差申请详细
export function getOaBusinessTravel(id) {
  return request({
    url: '/travel/oaBusinessTravel/' + id,
    method: 'get'
  })
}

// 保存出差申请
export function saveOaBusinessTravel(data) {
  return request({
    url: '/travel/oaBusinessTravel/save',
    method: 'post',
    data: data
  })
}

// 删除出差申请
export function delOaBusinessTravel(id) {
  return request({
    url: '/travel/oaBusinessTravel/' + id,
    method: 'delete'
  })
}

// 导出出差申请
export function exportOaBusinessTravel(query) {
  return request({
    url: '/travel/oaBusinessTravel/export',
    method: 'get',
    params: query
  })
}

// 删除字表数据 出差事由
export function deleteReasons(id) {
  return request({
    url: '/travel/oaBusinessTravel/deleteReasons/' + id,
    method: 'delete'
  })
}

// 文件上传
export function uploadFile(data) {
  return request({
    url: '/file/fileBase/upload',
    method: 'post',
    data: data
  })
}
